package com.ruoyi.erp.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.erp.mapper.ProjectBonusUserMapper;
import com.ruoyi.erp.domain.ProjectBonusUser;
import com.ruoyi.erp.service.IProjectBonusUserService;
import com.ruoyi.common.core.text.Convert;

/**
 * 项目提成用户Service业务层处理
 * 
 * @author sauger
 * @date 2022-04-21
 */
@Service
public class ProjectBonusUserServiceImpl implements IProjectBonusUserService 
{
    @Autowired
    private ProjectBonusUserMapper projectBonusUserMapper;

    /**
     * 查询项目提成用户
     * 
     * @param id 项目提成用户主键
     * @return 项目提成用户
     */
    @Override
    public ProjectBonusUser selectProjectBonusUserById(Integer id)
    {
        return projectBonusUserMapper.selectProjectBonusUserById(id);
    }

    /**
     * 查询项目提成用户列表
     * 
     * @param projectBonusUser 项目提成用户
     * @return 项目提成用户
     */
    @Override
    public List<ProjectBonusUser> selectProjectBonusUserList(ProjectBonusUser projectBonusUser)
    {
        return projectBonusUserMapper.selectProjectBonusUserList(projectBonusUser);
    }

    /**
     * 新增项目提成用户
     * 
     * @param projectBonusUser 项目提成用户
     * @return 结果
     */
    @Override
    public int insertProjectBonusUser(ProjectBonusUser projectBonusUser)
    {
        return projectBonusUserMapper.insertProjectBonusUser(projectBonusUser);
    }

    /**
     * 修改项目提成用户
     * 
     * @param projectBonusUser 项目提成用户
     * @return 结果
     */
    @Override
    public int updateProjectBonusUser(ProjectBonusUser projectBonusUser)
    {
        return projectBonusUserMapper.updateProjectBonusUser(projectBonusUser);
    }

    /**
     * 批量删除项目提成用户
     * 
     * @param ids 需要删除的项目提成用户主键
     * @return 结果
     */
    @Override
    public int deleteProjectBonusUserByIds(String ids)
    {
        return projectBonusUserMapper.deleteProjectBonusUserByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除项目提成用户信息
     * 
     * @param id 项目提成用户主键
     * @return 结果
     */
    @Override
    public int deleteProjectBonusUserById(Integer id)
    {
        return projectBonusUserMapper.deleteProjectBonusUserById(id);
    }
}
